package org.yufan;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.yufan.common.utils.JwtUtil;

@SpringBootApplication
@EnableDiscoveryClient
@EnableConfigurationProperties(JwtUtil.class)
public class UserApplication {

//    @Bean
//    public JwtUtil jwtUtil(){
//        return new JwtUtil();
//    }

    @Bean
    public BCryptPasswordEncoder bCryptPasswordEncoder(){
        return new BCryptPasswordEncoder();
    }

    public static void main(String[] args) {
        SpringApplication.run(UserApplication.class,args);
    }
}
